<template>
  <!-- 小地图 -->
  <div id="minimap"></div>
</template>

<script setup>
import { onMounted } from 'vue'
import { Graph, Shape } from '@antv/x6'
import { MiniMap } from '@antv/x6-plugin-minimap'

graph.use(
  new MiniMap({
    container: document.getElementById('minimap'),
    width: 200,
    height: 160,
    scalable: false,
    minScale: 0.1,
    maxScale: 2,
    padding: 10
  })
)
// 定义小地图
// const initMiniMap = () => {
//   const miniMap = new MiniMap({
//     container: document.getElementById('minimap'),
//     width: 200,
//     height: 160,
//     scalable: false,
//     minScale: 0.1,
//     maxScale: 2,
//     padding: 10
//   })
// 小地图功能
//   graph.value.use(miniMap)
// }

// 组件挂载时
// onMounted(() => {
//   initMiniMap()
// })
</script>

<style lang="scss" scoped></style>
